package cn.iocoder.yudao.module.crossborder.order.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 跨境电商退换货状态枚举
 *
 * @author LHL
 */
@AllArgsConstructor
@Getter
public enum ReturnStatusEnum {

    PENDING_REVIEW(10, "待审核"),
    APPROVED(20, "已同意"),
    REJECTED(30, "已拒绝"),
    PENDING_RETURN(40, "待退货"),
    RETURNED(50, "已退货"),
    RECEIVED(60, "已收货"),
    REFUNDED(70, "已退款"),
    COMPLETED(80, "已完成"),
    ;

    /**
     * 状态值
     */
    private final Integer status;
    
    /**
     * 状态名称
     */
    private final String name;

    public static ReturnStatusEnum getByStatus(Integer status) {
        for (ReturnStatusEnum value : values()) {
            if (value.getStatus().equals(status)) {
                return value;
            }
        }
        return null;
    }

}
